/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ile.DAO;

import java.sql.*;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author 
 */
public class CrearBaseDeDatos {

    public static Connection CONEXION;
    private static Statement sentencia;
    static ResultSet rs;
    public static String host_bd = "localhost";
    public static String user = "root";
    public static String clave = "root";

    public static Connection conectate() {

        try {
            try {
                Class.forName("com.mysql.jdbc.Driver");
                CONEXION = DriverManager.getConnection("jdbc:mysql://" + host_bd + ":3306/ILE", user, clave);
            } catch (SQLException e) {
                Logger.getLogger(CrearBaseDeDatos.class.getName()).log(Level.SEVERE, null, e);
            }
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(CrearBaseDeDatos.class.getName()).log(Level.SEVERE, null, ex);
        }
        return CONEXION;
    }
}
